PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Compiling Scripts With the Script Editor

When you create or modify a script and then attempt to run or save it as a compiled script or script application, the Script Editor asks AppleScript to compile the script first. To compile a script, AppleScript converts the script from the form typed into a Script Editor window (or any script-editing window) to an internal form that AppleScript can execute. The Script Editor also attempts to compile the script when you click the Check Syntax button.

If the script compiles successfully, the Script Editor dims the Check Syntax button and reformats the text of the script according to the preferences set with the Formatting command (in the Edit menu). This may cause indentation and spacing to change, and in some cases may even change the text, but it doesn't affect the meaning of the script. If AppleScript can't compile the script because of syntax errors or other problems, the Script Editor displays a dialog box describing the error or, if you are trying to save the script, allowing you to save the script as a text file only.

For additional information on compiling, see Double Angle Brackets in Results and Scripts.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)